

#include "Success.h"

#include <stdio.h>
#include <string.h> 


Success::Success (const SimpleString&	theTestName, 
		          const SimpleString&	theCondition) 
: message (theCondition), 
testName (theTestName)
{
}


Success::Success (const SimpleString&	theTestName, 
				  const SimpleString&	expected,
				  const SimpleString&	actual) 
: testName (theTestName)
{
	char *stage = new char [expected.size ()
        + actual.size ()
        + strlen (" == ")
        + 1];
    
	sprintf(stage, "%s == %s", 
            expected.asCharString(), 
            actual.asCharString());
    
	message = SimpleString(stage);
    
	delete stage;
}


